<template>
    <el-dialog :title="title" visible :width="width" center
               :visible.sync="dialogShow"
               v-if="dialogShow"
               :close-on-click-modal="false"
               :close-on-press-escape="false">
        <slot name="dialogSlot"></slot>
    </el-dialog>
</template>

<script>
    export default {
        data() {
          return {
              dialogShow: false
          }
        },
        props: {
            title: {
                default: '信息',
                type: String
            },
            width: {
                default: '700px',
                type: String
            }
        },
        methods: {
            show() {
                this.dialogShow = true;
            },
            hide() {
                this.dialogShow = false;
            }
        }
    }
</script>

<style scoped lang="less">

</style>
